
#ifndef _MEMBER_BScrollArea_H_
#define _MEMBER_BScrollArea_H_

#include <BRect>
#include <BScrollBar>
#include <BScrollArea>

#define area_member(scrollArea)	((member_BScrollArea*)((BScrollBar*)scrollArea)->_ptr)

namespace BWE
{
	class BWidget;
	class BScrollBar;

	class member_BScrollArea : public BObject
	{
	public:
		member_BScrollArea(BScrollArea* scrollArea);
		~member_BScrollArea();

		void procVerticalScrollStepChanged(BObject* object, const BValue& value);
		void procVerticalScrolling(BObject* object, const BValue& value);

		void procHorizontalScrollStepChanged(BObject* object, const BValue& value);
		void procHorizontalScrolling(BObject* object, const BValue& value);

		void adjustScrollBar();

		BScrollArea*		boss;
		BRect				area;
		int					vstep;
		int					hstep;

		ScrollBarPolicy		hScrollBarPolicy;
		BScrollBar*			hScrollBar;
		ScrollBarPolicy		vScrollBarPolicy;
		BScrollBar*			vScrollBar;
	};
}

#endif